package com.studor.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.studor.entity.Student;
import com.studor.mapper.StudentMapper;
import com.studor.service.StudentService;
import org.springframework.stereotype.Service;

@Service
public class StudentServiceImpl extends ServiceImpl<StudentMapper, Student> implements StudentService {

    @Override
    public Student getStudentByAccountId(Integer accountId) {
        QueryWrapper<Student> wrapper = new QueryWrapper<>();
        wrapper.eq("id", accountId);
        // 时间
        return this.getOne(wrapper);
    }
}
